<div>
	<input type="hidden" name="token" id="token" value="" />
</div>

<script type="text/javascript" >

function getToken() {
	$('#token').val("");
	var url = "/checkSubmission/generateToken.vhtml"; 
	$.ajax({
		type:"post",
		url:url,
		async:true,
		dataType:"json",
		success:function(data) {  
			if(data!=null){
				if(data.token!=null){
					$('#token').val(data.token);
				}
			}
		}
	});		    	
}; 
//getToken();
</script>